﻿<UserControl x:Class="BombaJob.Views.PostView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:properties="clr-namespace:BombaJob.Properties"
             xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
             xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="600">

    <mah:MetroContentControl>
        <ScrollViewer>
            <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollViewer.CanContentScroll="True"
                  ScrollViewer.VerticalScrollBarVisibility="Auto">
                <StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" Margin="20,10,10,20">
                        <TextBlock Text="{x:Static properties:Resources.offer_iam_title}"
                                   Foreground="#FF000000" FontSize="16" TextWrapping="Wrap" Margin="0,0,20,0"/>
                        <RadioButton GroupName="IAM" Content="{x:Static properties:Resources.offer_iam_human}" IsChecked="True"
                                     FontSize="16" Margin="0,0,20,0" Tag="1" TabIndex="1"
                                     cal:Message.Attach="[Event Click] = [Action SetLabels($source)]"/>
                        <RadioButton GroupName="IAM" Content="{x:Static properties:Resources.offer_iam_company}"
                                     FontSize="16" Tag="2" TabIndex="2"
                                     cal:Message.Attach="[Event Click] = [Action SetLabels($source)]"/>
                    </StackPanel>

                    <CheckBox x:Name="OfferFreelance" Foreground="#FF000000" FontSize="16" Margin="20,0,10,10" TabIndex="3">
                        <TextBlock Text="{x:Static properties:Resources.offer_FreelanceCheck}" Margin="0,-8,0,0" />
                    </CheckBox>

                    <TextBlock Text="{Binding LabelCategory}"
                               Foreground="#FF000000" FontSize="16" Margin="20,0,10,10" TextWrapping="Wrap"/>
                    <ComboBox x:Name="Categories" IsEditable="True" IsReadOnly="True" TabIndex="4"
                              mah:TextboxHelper.Watermark="{x:Static properties:Resources.offer_CategoryWatermark}"
                              FontSize="16" Margin="20,0,10,10" BorderBrush="Orange" BorderThickness="1"
                              ItemsSource="{Binding Categories}" DisplayMemberPath="Title" SelectedValuePath="CategoryID"
                              cal:Message.Attach="[Event SelectionChanged] = [Action SelectedItemChanged($this.SelectedItem)]"/>

                    <TextBlock Text="{Binding LabelTitle}"  
                               Foreground="#FF000000" FontSize="16" Margin="20,0,10,10" TextWrapping="Wrap"/>
                    <TextBox x:Name="OfferTitle" MaxLength="255" HorizontalAlignment="Stretch"
                             Margin="20,0,10,10" BorderBrush="Orange" BorderThickness="1" FontSize="16"
                             mah:TextboxHelper.ClearTextButton="True" TabIndex="5"
                             mah:TextboxHelper.Watermark="{Binding LabelTitleTip}" />

                    <TextBlock Text="{Binding LabelEmail}"
                               Foreground="#FF000000" FontSize="16" Margin="20,0,10,10" TextWrapping="Wrap"/>
                    <TextBox x:Name="OfferEmail" MaxLength="255" HorizontalAlignment="Stretch"
                             Margin="20,0,10,10" BorderBrush="Orange" BorderThickness="1" FontSize="16"
                             mah:TextboxHelper.ClearTextButton="True" TabIndex="6"
                             mah:TextboxHelper.Watermark="{Binding LabelEmailTip}"/>

                    <TextBlock Text="{Binding LabelPositiv}"
                               Foreground="#FF000000" FontSize="16" Margin="20,0,10,10" TextWrapping="Wrap"/>
                    <TextBox x:Name="OfferPositiv" HorizontalAlignment="Stretch"
                             Margin="20,0,10,10" BorderBrush="Orange" BorderThickness="1" FontSize="16"
                             mah:TextboxHelper.ClearTextButton="True" TabIndex="7"
                             TextWrapping="Wrap" AcceptsReturn="True" Height="Auto" VerticalScrollBarVisibility="Visible"
                             mah:TextboxHelper.Watermark="{Binding LabelPositivTip}"/>

                    <TextBlock Text="{Binding LabelNegativ}"
                               Foreground="#FF000000" FontSize="16" Margin="20,0,10,10" TextWrapping="Wrap"/>
                    <TextBox Name="OfferNegativ" HorizontalAlignment="Stretch"
                             Margin="20,0,10,10" BorderBrush="Orange" BorderThickness="1" FontSize="16"
                             mah:TextboxHelper.ClearTextButton="True" TabIndex="8"
                             TextWrapping="Wrap" AcceptsReturn="True" Height="Auto" VerticalScrollBarVisibility="Visible"
                             mah:TextboxHelper.Watermark="{Binding LabelNegativTip}"
                             xml:space="preserve"/>

                    <Button x:Name="PostOffer" Content="{x:Static properties:Resources.offer_Boom}"
                            HorizontalAlignment="Stretch" VerticalAlignment="Bottom"
                            FontSize="18" Margin="20,10,10,40" Padding="10" TabIndex="9"
                            BorderBrush="Orange" BorderThickness="1"/>
                </StackPanel>
            </Grid>
        </ScrollViewer>
    </mah:MetroContentControl>

</UserControl>
